import { ProcessStageCodeEnum, StandardEnum } from '@/constants/enum';

export interface IModelListParams {
  current?: string | number;
  size?: string | number;
  nameOrCode?: string;
  enterpriseName?: string;
  modelType?: string;
  standard?: string;
  accountYear?: string;
  accountStatus?: string;
  tag?: string;
}

export interface IModelCreate {
  modelNo?: string;
  modelName: string;
  modelCode: string;
  specification: string;
  weight: string;
  weightUnit: string;
  modelType: string;
  vehicleType: string;
  standard: keyof typeof StandardEnum;
  functionalUnit: string;
  // 核算数量
  num: number;
  // 核算单位
  unit: string;
  tag: string; // ,分隔的字符串
  // 参考流值
  referenceFlowValue: number;
  // 参考流单位
  referenceFlowUnit: string;
  accountYear: string;
  manufactureCountry: string;
  manufactureAddress: string;
  accountBoundary: string;
  accountStage: (keyof typeof ProcessStageCodeEnum)[];
  fileName: string;
  fileUrl: string;
}

export type ModelDetailResult = IModelCreate & { modelNo: string; enterpriseNo: string };

export interface ICopyParams {
  modelNo: string;
  modelPurpose: 'SELF_USE' | 'RESPONSE';
}

// 查询所有可以被关联的模型 返回参数
export interface QueryRelatableModelResult {
  // 模型编号
  modelNo: string;
  // 模型名称
  name: string;
  // 模型核算数量单位
  unit: string;
  // 模型核算数量
  num: string;
}

// 获取用户工厂信息 返回参数
export interface GetEPSUserFactoryInfoResult {
  // 工厂编号
  fieldNo: string;
  // 工厂名称
  fieldName: string;
}

export interface IModelListItem {
  modelNo: string;
  modelName: string;
  modelCode: string;
  modelType: string;
  standard: string;
  tag: string;
  functionalUnit: string;
  accountYear: string;
  createTime: string;
  creator: string;
  status: string;
}

export interface IRecycleItem {
  modelNo: string;
  modelName: string;
  modelType: string;
  accountYear: string;
  recycleTime: string;
  recyclePerson: string;
}

export interface RelationBatchFactorParams {
  modelNo: string;
  factorNo: string;
  nodeNoList: string[];
}
